gtk: Handle seatless displays
authorMatthias Clasen <mclasen@redhat.com>
Fri, 15 May 2020 01:27:45 +0000 (21:27 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 15 May 2020 18:11:53 +0000 (14:11 -0400)
commit8912a6eb757c39a6801358331fa81f8f52ebad8a
treeb410b78952f174bed33fd9d1fb63615eb20d3082
parent9b7a73268ea264f5674d04e129d9dabf680d3513
gtk: Handle seatless displays

If you run weston with the headless backend, you get a Wayland
display with no seat, which is just fine by the protocol.

gdk_display_get_default_seat() returns NULL in this case. Various
widgets assume that we always have a seat with a keyboard and a
pointer, since that is what X guarantees. Make things survive
without that, so we can run the testsuite under a headless
Wayland compositor.
14 files changed:
gdk/gdksurface.c
gdk/wayland/gdkdisplay-wayland.c
gdk/wayland/gdksurface-wayland.c
gtk/gtklabel.c
gtk/gtkpasswordentry.c
gtk/gtkstylecontext.c
gtk/gtktext.c
gtk/gtktextview.c
gtk/gtktooltip.c
gtk/gtkwidget.c
gtk/gtkwindow.c
gtk/inspector/inspect-button.c
testsuite/gdk/seat.c
testsuite/gtk/shortcuts.c